How to use regular expression for email validation in mvc Anonymous User141026-Feb-2016 We want to use regular expression for email validation in mvc .I have already used "^[a-zA-Z0-9-.]+@[a-zA-Z0-9-.]+$" but it is not working with "_" characters .How we will do this Please help me.asp.net mvcmvc data validation Updated on 26-Feb-2016
Anonymous User
26-Feb-2016If you are using pattern "^[a-zA-Z0-9-.]+@[a-zA-Z0-9-.]+$" please
replace your pattern "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
it will work properly.